#!/bin/sh

echo '>>>>开始打包'
cd ..
mvn -U clean package assembly:assembly -Dmaven.test.skip=true

echo '>>>>打包完成'
cd target/datax

mv datax/plugin/  plugin/
#
tar -zcvf  datax-no-plugins.tar.gz   datax
#
tar -zcvf  datax-plugins.tar.gz      plugin

echo '->>>包分离完成'

ls -ls |grep  tar.gz

cp    datax-plugins.tar.gz     ../../DockerFile/
cp    datax-no-plugins.tar.gz  ../../DockerFile/

echo '->>>拷贝完成'

cd ../../DockerFile/
pwd
ls -ls
echo '->>>开始制作镜像'

docker build -t  dataxgroup/datax:v3.0.1  .

echo '->>>制作镜像完成'
docker images | grep datax